package com.tgb.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
 * 审批实体
 * @author hejingyuan
 *
 */
@Entity
@Table(name = "Approve")
public class Approve implements Serializable { 

	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	//审批人
	private String userId;
	//审批意见
	private String advice;
	//审批结果
	private String result;
	//申请
	private Leave leave;
	
	@Id
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	@Column
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	@Column
	public String getAdvice() {
		return advice;
	}
	public void setAdvice(String advice) {
		this.advice = advice;
	}
	@Column
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="leave_id") 
	public Leave getLeave() {
		return leave;
	}
	public void setLeave(Leave leave) {
		this.leave = leave;
	}
}
